package com.partterns.factory;

public class ColorFactoryAbs extends AbstractFactory{

    @Override
    Shape getShape(String shape) {
        return null;
    }

    @Override
    Color getColor(String colorType) {
        if(colorType==null){
            return null;
        }
        if(colorType.equalsIgnoreCase("RED")){
            return new Red();
        }else if(colorType.equalsIgnoreCase("GREEN")){
            return new Green();
        }else{
            return null;
        }
    }
}
